home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2000 September / maximum-cd-2000-09.iso / Vampire the Masquerade / vampire_demo.exe / Codex.nob / CodexVector.class (.txt) < prev    next >
Encoding:
Java Class File  |  2000-06-22  |  15.2 KB  |  662 lines

  1. public class CodexVector extends Codex {
  2.    // $FF: renamed from: v float[]
  3.    private float[] field_0 = new float[3];
  4.  
  5.    public void Scale(float scale, CodexVector op1) {
  6.       this.field_0[0] = op1.GetX() * scale;
  7.       this.field_0[1] = op1.GetY() * scale;
  8.       this.field_0[2] = op1.GetZ() * scale;
  9.    }
  10.  
  11.    public void Scale(CodexVector op1, float scale) {
  12.       this.field_0[0] = op1.GetX() * scale;
  13.       this.field_0[1] = op1.GetY() * scale;
  14.       this.field_0[2] = op1.GetZ() * scale;
  15.    }
  16.  
  17.    public void Scale(float scale, float[] op1) {
  18.       this.field_0[0] = op1[0] * scale;
  19.       this.field_0[1] = op1[1] * scale;
  20.       this.field_0[2] = op1[2] * scale;
  21.    }
  22.  
  23.    public void Scale(float[] op1, float scale) {
  24.       this.field_0[0] = op1[0] * scale;
  25.       this.field_0[1] = op1[1] * scale;
  26.       this.field_0[2] = op1[2] * scale;
  27.    }
  28.  
  29.    public boolean IsZero() {
  30.       return this.field_0[0] == 0.0F && this.field_0[1] == 0.0F && this.field_0[2] == 0.0F;
  31.    }
  32.  
  33.    public void SetXZ(float x, float z) {
  34.       this.field_0[0] = x;
  35.       this.field_0[2] = z;
  36.    }
  37.  
  38.    public void SetXZ(CodexVector op1) {
  39.       this.field_0[0] = op1.GetX();
  40.       this.field_0[2] = op1.GetZ();
  41.    }
  42.  
  43.    public void SetXZ(float[] op1) {
  44.       this.field_0[0] = op1[0];
  45.       this.field_0[2] = op1[2];
  46.    }
  47.  
  48.    public boolean Equals() {
  49.       return this.field_0[0] == 0.0F && this.field_0[1] == 0.0F && this.field_0[2] == 0.0F;
  50.    }
  51.  
  52.    public void Set() {
  53.       this.field_0[0] = 0.0F;
  54.       this.field_0[1] = 0.0F;
  55.       this.field_0[2] = 0.0F;
  56.    }
  57.  
  58.    public void Set(CodexVector op1) {
  59.       this.field_0[0] = op1.GetX();
  60.       this.field_0[1] = op1.GetY();
  61.       this.field_0[2] = op1.GetZ();
  62.    }
  63.  
  64.    public void Set(float x, float y, float z) {
  65.       this.field_0[0] = x;
  66.       this.field_0[1] = y;
  67.       this.field_0[2] = z;
  68.    }
  69.  
  70.    public void Set(float[] op1) {
  71.       this.field_0[0] = op1[0];
  72.       this.field_0[1] = op1[1];
  73.       this.field_0[2] = op1[2];
  74.    }
  75.  
  76.    public boolean Equals(CodexVector op1) {
  77.       return this.field_0[0] == op1.GetX() && this.field_0[1] == op1.GetY() && this.field_0[2] == op1.GetZ();
  78.    }
  79.  
  80.    public boolean Equals(float x, float y, float z) {
  81.       return this.field_0[0] == x && this.field_0[1] == y && this.field_0[2] == z;
  82.    }
  83.  
  84.    public boolean Equals(float[] farray) {
  85.       return this.field_0[0] == farray[0] && this.field_0[1] == farray[1] && this.field_0[2] == farray[2];
  86.    }
  87.  
  88.    public static boolean Equals(CodexVector op1, CodexVector op2) {
  89.       return op1.GetX() == op2.GetX() && op1.GetY() == op2.GetY() && op1.GetZ() == op2.GetZ();
  90.    }
  91.  
  92.    public static boolean Equals(CodexVector op1, float x, float y, float z) {
  93.       return op1.GetX() == x && op1.GetY() == y && op1.GetZ() == z;
  94.    }
  95.  
  96.    public static boolean Equals(float x, float y, float z, CodexVector op4) {
  97.       return op4.GetX() == x && op4.GetY() == y && op4.GetZ() == z;
  98.    }
  99.  
  100.    public static boolean Equals(CodexVector op1, float[] op2) {
  101.       return op1.GetX() == op2[0] && op1.GetY() == op2[1] && op1.GetZ() == op2[2];
  102.    }
  103.  
  104.    public static boolean Equals(float[] op1, CodexVector op2) {
  105.       return op2.GetX() == op1[0] && op2.GetY() == op1[1] && op2.GetZ() == op1[2];
  106.    }
  107.  
  108.    public static boolean Equals(float x, float y, float z, float[] op4) {
  109.       return x == op4[0] && y == op4[1] && z == op4[2];
  110.    }
  111.  
  112.    public static boolean Equals(float[] op1, float x, float y, float z) {
  113.       return x == op1[0] && y == op1[1] && z == op1[2];
  114.    }
  115.  
  116.    public float GetZ() {
  117.       return this.field_0[2];
  118.    }
  119.  
  120.    public static boolean Equals(float[] op1, float[] op2) {
  121.       return op1[0] == op2[0] && op1[1] == op2[1] && op1[2] == op2[2];
  122.    }
  123.  
  124.    public static boolean Equals(float x, float y, float z, float x2, float y2, float z2) {
  125.       return x == x2 && y == y2 && z == z2;
  126.    }
  127.  
  128.    public float Max() {
  129.       return Math.max(this.field_0[0], Math.max(this.field_0[1], this.field_0[2]));
  130.    }
  131.  
  132.    public static float Max(CodexVector op1) {
  133.       return Math.max(op1.GetX(), Math.max(op1.GetY(), op1.GetZ()));
  134.    }
  135.  
  136.    public static float Max(float x, float y, float z) {
  137.       return Math.max(x, Math.max(y, z));
  138.    }
  139.  
  140.    public static float Max(float[] op1) {
  141.       return Math.max(op1[0], Math.max(op1[1], op1[2]));
  142.    }
  143.  
  144.    public void Cross(CodexVector op1) {
  145.       float v1 = this.field_0[1] * op1.GetZ() - this.field_0[2] * op1.GetY();
  146.       float v2 = this.field_0[2] * op1.GetX() - this.field_0[0] * op1.GetZ();
  147.       float v3 = this.field_0[0] * op1.GetY() - this.field_0[1] * op1.GetX();
  148.       this.Set(v1, v2, v3);
  149.    }
  150.  
  151.    public void Cross(float x, float y, float z) {
  152.       float v1 = this.field_0[1] * z - this.field_0[2] * y;
  153.       float v2 = this.field_0[2] * x - this.field_0[0] * z;
  154.       float v3 = this.field_0[0] * y - this.field_0[1] * x;
  155.       this.Set(v1, v2, v3);
  156.    }
  157.  
  158.    public void Cross(float[] op1) {
  159.       float v1 = this.field_0[1] * op1[2] - this.field_0[2] * op1[1];
  160.       float v2 = this.field_0[2] * op1[0] - this.field_0[0] * op1[2];
  161.       float v3 = this.field_0[0] * op1[1] - this.field_0[1] * op1[0];
  162.       this.Set(v1, v2, v3);
  163.    }
  164.  
  165.    public void Cross(CodexVector op1, CodexVector op2) {
  166.       float v1 = op1.GetY() * op2.GetZ() - op1.GetZ() * op2.GetY();
  167.       float v2 = op1.GetZ() * op2.GetX() - op1.GetX() * op2.GetZ();
  168.       float v3 = op1.GetX() * op2.GetY() - op1.GetY() * op2.GetX();
  169.       this.Set(v1, v2, v3);
  170.    }
  171.  
  172.    public void Cross(CodexVector op1, float x, float y, float z) {
  173.       float v1 = op1.GetY() * z - op1.GetZ() * y;
  174.       float v2 = op1.GetZ() * x - op1.GetX() * z;
  175.       float v3 = op1.GetX() * y - op1.GetY() * x;
  176.       this.Set(v1, v2, v3);
  177.    }
  178.  
  179.    public void Cross(float x, float y, float z, CodexVector op4) {
  180.       float v1 = op4.GetZ() * y - op4.GetY() * z;
  181.       float v2 = op4.GetX() * z - op4.GetZ() * x;
  182.       float v3 = op4.GetY() * x - op4.GetX() * y;
  183.       this.Set(v1, v2, v3);
  184.    }
  185.  
  186.    public void Cross(CodexVector op1, float[] op2) {
  187.       float v1 = op1.GetY() * op2[2] - op1.GetZ() * op2[1];
  188.       float v2 = op1.GetZ() * op2[0] - op1.GetX() * op2[2];
  189.       float v3 = op1.GetX() * op2[1] - op1.GetY() * op2[0];
  190.       this.Set(v1, v2, v3);
  191.    }
  192.  
  193.    public void Cross(float[] op1, CodexVector op2) {
  194.       float v1 = op2.GetZ() * op1[1] - op2.GetY() * op1[2];
  195.       float v2 = op2.GetX() * op1[2] - op2.GetZ() * op1[0];
  196.       float v3 = op2.GetY() * op1[0] - op2.GetX() * op1[1];
  197.       this.Set(v1, v2, v3);
  198.    }
  199.  
  200.    public void Cross(float x, float y, float z, float[] op4) {
  201.       float v1 = y * op4[2] - z * op4[1];
  202.       float v2 = z * op4[0] - x * op4[2];
  203.       float v3 = x * op4[1] - y * op4[0];
  204.       this.Set(v1, v2, v3);
  205.    }
  206.  
  207.    public void Cross(float[] op1, float x, float y, float z) {
  208.       float v1 = z * op1[1] - y * op1[2];
  209.       float v2 = x * op1[2] - z * op1[0];
  210.       float v3 = y * op1[0] - x * op1[1];
  211.       this.Set(v1, v2, v3);
  212.    }
  213.  
  214.    public void Cross(float x, float y, float z, float x2, float y2, float z2) {
  215.       float v1 = y * z2 - z * y2;
  216.       float v2 = z * x2 - x * z2;
  217.       float v3 = x * y2 - y * x2;
  218.       this.Set(v1, v2, v3);
  219.    }
  220.  
  221.    public void Cross(float[] op1, float[] op2) {
  222.       float v1 = op2[2] * op1[1] - op2[1] * op1[2];
  223.       float v2 = op2[0] * op1[2] - op2[2] * op1[0];
  224.       float v3 = op2[1] * op1[0] - op2[0] * op1[1];
  225.       this.Set(v1, v2, v3);
  226.    }
  227.  
  228.    public void SetRandom() {
  229.       this.field_0[0] = (float)((Math.random() - (double)0.5F) * (double)2.0F);
  230.       this.field_0[1] = (float)((Math.random() - (double)0.5F) * (double)2.0F);
  231.       this.field_0[2] = (float)((Math.random() - (double)0.5F) * (double)2.0F);
  232.    }
  233.  
  234.    public String ToString() {
  235.       return "<" + Float.toString(this.field_0[0]) + " / " + Float.toString(this.field_0[1]) + " / " + Float.toString(this.field_0[2]) + ">";
  236.    }
  237.  
  238.    public void SetUnitY() {
  239.       this.field_0[0] = 0.0F;
  240.       this.field_0[1] = 1.0F;
  241.       this.field_0[2] = 0.0F;
  242.    }
  243.  
  244.    public void SetY(float[] op1) {
  245.       this.field_0[1] = op1[1];
  246.    }
  247.  
  248.    public void SetY(float y) {
  249.       this.field_0[1] = y;
  250.    }
  251.  
  252.    public void SetY(CodexVector op1) {
  253.       this.field_0[1] = op1.GetY();
  254.    }
  255.  
  256.    public void SetUnitX() {
  257.       this.field_0[0] = 1.0F;
  258.       this.field_0[1] = 0.0F;
  259.       this.field_0[2] = 0.0F;
  260.    }
  261.  
  262.    public void Add(CodexVector op1) {
  263.       float[] var10000 = this.field_0;
  264.       var10000[0] += op1.GetX();
  265.       var10000 = this.field_0;
  266.       var10000[1] += op1.GetY();
  267.       var10000 = this.field_0;
  268.       var10000[2] += op1.GetZ();
  269.    }
  270.  
  271.    public void Add(float x, float y, float z) {
  272.       float[] var10000 = this.field_0;
  273.       var10000[0] += x;
  274.       var10000 = this.field_0;
  275.       var10000[1] += y;
  276.       var10000 = this.field_0;
  277.       var10000[2] += z;
  278.    }
  279.  
  280.    public void Add(float[] op1) {
  281.       float[] var10000 = this.field_0;
  282.       var10000[0] += op1[0];
  283.       var10000 = this.field_0;
  284.       var10000[1] += op1[1];
  285.       var10000 = this.field_0;
  286.       var10000[2] += op1[2];
  287.    }
  288.  
  289.    public void Add(CodexVector op1, CodexVector op2) {
  290.       this.field_0[0] = op1.GetX() + op2.GetX();
  291.       this.field_0[1] = op1.GetY() + op2.GetY();
  292.       this.field_0[2] = op1.GetZ() + op2.GetZ();
  293.    }
  294.  
  295.    public void Add(CodexVector op1, float x, float y, float z) {
  296.       this.field_0[0] = op1.GetX() + x;
  297.       this.field_0[1] = op1.GetY() + y;
  298.       this.field_0[2] = op1.GetZ() + z;
  299.    }
  300.  
  301.    public void Add(float x, float y, float z, CodexVector op4) {
  302.       this.field_0[0] = op4.GetX() + x;
  303.       this.field_0[1] = op4.GetY() + y;
  304.       this.field_0[2] = op4.GetZ() + z;
  305.    }
  306.  
  307.    public void Add(CodexVector op1, float[] op2) {
  308.       this.field_0[0] = op1.GetX() + op2[0];
  309.       this.field_0[1] = op1.GetY() + op2[1];
  310.       this.field_0[2] = op1.GetZ() + op2[2];
  311.    }
  312.  
  313.    public void Add(float[] op1, CodexVector op2) {
  314.       this.field_0[0] = op2.GetX() + op1[0];
  315.       this.field_0[1] = op2.GetY() + op1[1];
  316.       this.field_0[2] = op2.GetZ() + op1[2];
  317.    }
  318.  
  319.    public void Add(float x, float y, float z, float[] op4) {
  320.       this.field_0[0] = x + op4[0];
  321.       this.field_0[1] = y + op4[1];
  322.       this.field_0[2] = y + op4[2];
  323.    }
  324.  
  325.    public void Add(float[] op1, float x, float y, float z) {
  326.       this.field_0[0] = x + op1[0];
  327.       this.field_0[1] = y + op1[1];
  328.       this.field_0[2] = y + op1[2];
  329.    }
  330.  
  331.    public void Add(float[] op1, float[] op2) {
  332.       this.field_0[0] = op2[0] + op1[0];
  333.       this.field_0[1] = op2[1] + op1[1];
  334.       this.field_0[2] = op2[2] + op1[2];
  335.    }
  336.  
  337.    public void SetX(float x) {
  338.       this.field_0[0] = x;
  339.    }
  340.  
  341.    public void SetX(CodexVector op1) {
  342.       this.field_0[0] = op1.GetX();
  343.    }
  344.  
  345.    public void SetX(float[] op1) {
  346.       this.field_0[0] = op1[0];
  347.    }
  348.  
  349.    public void SetYZ(float y, float z) {
  350.       this.field_0[1] = y;
  351.       this.field_0[2] = z;
  352.    }
  353.  
  354.    public void SetYZ(CodexVector op1) {
  355.       this.field_0[1] = op1.GetY();
  356.       this.field_0[2] = op1.GetZ();
  357.    }
  358.  
  359.    public void SetYZ(float[] op1) {
  360.       this.field_0[1] = op1[1];
  361.       this.field_0[2] = op1[2];
  362.    }
  363.  
  364.    public void Add(float x, float y, float z, float x2, float y2, float z2) {
  365.       this.field_0[0] = x + x2;
  366.       this.field_0[1] = y + y2;
  367.       this.field_0[2] = y + z2;
  368.    }
  369.  
  370.    public void Sub(CodexVector op1) {
  371.       float[] var10000 = this.field_0;
  372.       var10000[0] -= op1.GetX();
  373.       var10000 = this.field_0;
  374.       var10000[1] -= op1.GetY();
  375.       var10000 = this.field_0;
  376.       var10000[2] -= op1.GetZ();
  377.    }
  378.  
  379.    public void Sub(float x, float y, float z) {
  380.       float[] var10000 = this.field_0;
  381.       var10000[0] -= x;
  382.       var10000 = this.field_0;
  383.       var10000[1] -= y;
  384.       var10000 = this.field_0;
  385.       var10000[2] -= z;
  386.    }
  387.  
  388.    public void Neg() {
  389.       this.field_0[0] = -this.field_0[1];
  390.       this.field_0[1] = -this.field_0[0];
  391.       this.field_0[2] = -this.field_0[2];
  392.    }
  393.  
  394.    public void Neg(CodexVector op1) {
  395.       this.field_0[0] = -op1.GetX();
  396.       this.field_0[1] = -op1.GetY();
  397.       this.field_0[2] = -op1.GetZ();
  398.    }
  399.  
  400.    public void Neg(float[] op1) {
  401.       this.field_0[0] = op1[0];
  402.       this.field_0[1] = op1[1];
  403.       this.field_0[2] = op1[2];
  404.    }
  405.  
  406.    public void Sub(float[] op1) {
  407.       float[] var10000 = this.field_0;
  408.       var10000[0] -= op1[0];
  409.       var10000 = this.field_0;
  410.       var10000[1] -= op1[1];
  411.       var10000 = this.field_0;
  412.       var10000[2] -= op1[2];
  413.    }
  414.  
  415.    public void Sub(CodexVector op1, CodexVector op2) {
  416.       this.field_0[0] = op1.GetX() - op2.GetX();
  417.       this.field_0[1] = op1.GetY() - op2.GetY();
  418.       this.field_0[2] = op1.GetZ() - op2.GetZ();
  419.    }
  420.  
  421.    public void Sub(CodexVector op1, float x, float y, float z) {
  422.       this.field_0[0] = op1.GetX() - x;
  423.       this.field_0[1] = op1.GetY() - y;
  424.       this.field_0[2] = op1.GetZ() - z;
  425.    }
  426.  
  427.    public void Sub(float x, float y, float z, CodexVector op4) {
  428.       this.field_0[0] = x - op4.GetX();
  429.       this.field_0[1] = y - op4.GetY();
  430.       this.field_0[2] = z - op4.GetZ();
  431.    }
  432.  
  433.    public void Sub(CodexVector op1, float[] op2) {
  434.       this.field_0[0] = op1.GetX() - op2[0];
  435.       this.field_0[1] = op1.GetY() - op2[1];
  436.       this.field_0[2] = op1.GetZ() - op2[2];
  437.    }
  438.  
  439.    public void Sub(float[] op1, CodexVector op2) {
  440.       this.field_0[0] = op1[0] - op2.GetX();
  441.       this.field_0[1] = op1[1] - op2.GetY();
  442.       this.field_0[2] = op1[2] - op2.GetZ();
  443.    }
  444.  
  445.    public void Sub(float x, float y, float z, float[] op4) {
  446.       this.field_0[0] = x - op4[0];
  447.       this.field_0[1] = y - op4[1];
  448.       this.field_0[2] = y - op4[2];
  449.    }
  450.  
  451.    public void Sub(float[] op1, float x, float y, float z) {
  452.       this.field_0[0] = op1[0] - x;
  453.       this.field_0[1] = op1[1] - y;
  454.       this.field_0[2] = op1[2] - z;
  455.    }
  456.  
  457.    public void Sub(float[] op1, float[] op2) {
  458.       this.field_0[0] = op2[0] - op1[0];
  459.       this.field_0[1] = op2[1] - op1[1];
  460.       this.field_0[2] = op2[2] - op1[2];
  461.    }
  462.  
  463.    public void SetXY(float x, float y) {
  464.       this.field_0[0] = x;
  465.       this.field_0[1] = y;
  466.    }
  467.  
  468.    public void SetXY(CodexVector op1) {
  469.       this.field_0[0] = op1.GetX();
  470.       this.field_0[1] = op1.GetY();
  471.    }
  472.  
  473.    public void SetXY(float[] op1) {
  474.       this.field_0[0] = op1[0];
  475.       this.field_0[1] = op1[1];
  476.    }
  477.  
  478.    public void Sub(float x, float y, float z, float x2, float y2, float z2) {
  479.       this.field_0[0] = x - x2;
  480.       this.field_0[1] = y - y2;
  481.       this.field_0[2] = y - z2;
  482.    }
  483.  
  484.    public void SetUnitZ() {
  485.       this.field_0[0] = 0.0F;
  486.       this.field_0[1] = 0.0F;
  487.       this.field_0[2] = 1.0F;
  488.    }
  489.  
  490.    public float GetY() {
  491.       return this.field_0[1];
  492.    }
  493.  
  494.    public float Dot(CodexVector op1) {
  495.       return this.field_0[0] * op1.GetX() + this.field_0[1] * op1.GetY() + this.field_0[2] * op1.GetZ();
  496.    }
  497.  
  498.    public float Dot(float x, float y, float z) {
  499.       return this.field_0[0] * x + this.field_0[1] * y + this.field_0[2] * z;
  500.    }
  501.  
  502.    public float Dot(float[] op1) {
  503.       return this.field_0[0] * op1[0] + this.field_0[1] * op1[1] + this.field_0[2] * op1[2];
  504.    }
  505.  
  506.    public static float Dot(CodexVector op1, CodexVector op2) {
  507.       return op1.GetX() * op2.GetX() + op1.GetY() * op2.GetY() + op1.GetZ() * op2.GetZ();
  508.    }
  509.  
  510.    public float Len() {
  511.       return (float)Math.sqrt((double)(this.field_0[0] * this.field_0[0] + this.field_0[1] * this.field_0[1] + this.field_0[2] * this.field_0[2]));
  512.    }
  513.  
  514.    public static float Len(CodexVector op1) {
  515.       return (float)Math.sqrt((double)(op1.GetX() * op1.GetX() + op1.GetY() * op1.GetY() + op1.GetZ() * op1.GetZ()));
  516.    }
  517.  
  518.    public static float Len(float x, float y, float z) {
  519.       return (float)Math.sqrt((double)(x * x + y * y + z * z));
  520.    }
  521.  
  522.    public static float Len(float[] op1) {
  523.       return (float)Math.sqrt((double)(op1[0] * op1[0] + op1[1] * op1[1] + op1[2] * op1[2]));
  524.    }
  525.  
  526.    public static float Dot(CodexVector op1, float x, float y, float z) {
  527.       return op1.GetX() * x + op1.GetY() * y + op1.GetZ() * z;
  528.    }
  529.  
  530.    public static float Dot(float x, float y, float z, CodexVector op4) {
  531.       return op4.GetX() * x + op4.GetY() * y + op4.GetZ() * z;
  532.    }
  533.  
  534.    public static float Dot(CodexVector op1, float[] op2) {
  535.       return op1.GetX() * op2[0] + op1.GetY() * op2[1] + op1.GetZ() * op2[2];
  536.    }
  537.  
  538.    public static float Dot(float[] op1, CodexVector op2) {
  539.       return op2.GetX() * op1[0] + op2.GetY() * op1[1] + op2.GetZ() * op1[2];
  540.    }
  541.  
  542.    public static float Dot(float x, float y, float z, float[] op4) {
  543.       return x * op4[0] + y * op4[1] + z * op4[2];
  544.    }
  545.  
  546.    public static float Dot(float[] op1, float x, float y, float z) {
  547.       return x * op1[0] + y * op1[1] + z * op1[2];
  548.    }
  549.  
  550.    public static float Dot(float x, float y, float z, float x2, float y2, float z2) {
  551.       return x * x2 + y * y2 + z * z2;
  552.    }
  553.  
  554.    public static float Dot(float[] op1, float[] op2) {
  555.       return op1[0] * op2[0] + op1[1] * op2[1] + op1[2] * op2[2];
  556.    }
  557.  
  558.    public void SetZ(float z) {
  559.       this.field_0[2] = z;
  560.    }
  561.  
  562.    public void SetZ(CodexVector op1) {
  563.       this.field_0[2] = op1.GetZ();
  564.    }
  565.  
  566.    public void SetZ(float[] op1) {
  567.       this.field_0[2] = op1[2];
  568.    }
  569.  
  570.    public float GetX() {
  571.       return this.field_0[0];
  572.    }
  573.  
  574.    public float Normalize() {
  575.       float len = this.Len();
  576.       if ((double)len != (double)0.0F) {
  577.          float oneOverLen = 1.0F / len;
  578.          float[] var10000 = this.field_0;
  579.          var10000[0] *= oneOverLen;
  580.          var10000 = this.field_0;
  581.          var10000[1] *= oneOverLen;
  582.          var10000 = this.field_0;
  583.          var10000[2] *= oneOverLen;
  584.       }
  585.  
  586.       return len;
  587.    }
  588.  
  589.    public float[] AsArray() {
  590.       return this.field_0;
  591.    }
  592.  
  593.    public float Normalize(CodexVector op1) {
  594.       float len = Len(op1);
  595.       if ((double)len != (double)0.0F) {
  596.          float oneOverLen = 1.0F / len;
  597.          this.field_0[0] = op1.GetX() * oneOverLen;
  598.          this.field_0[1] = op1.GetY() * oneOverLen;
  599.          this.field_0[2] = op1.GetZ() * oneOverLen;
  600.       }
  601.  
  602.       return len;
  603.    }
  604.  
  605.    public float Normalize(float x, float y, float z) {
  606.       float len = Len(x, y, z);
  607.       if ((double)len != (double)0.0F) {
  608.          float oneOverLen = 1.0F / len;
  609.          this.field_0[0] = x * oneOverLen;
  610.          this.field_0[1] = y * oneOverLen;
  611.          this.field_0[2] = z * oneOverLen;
  612.       }
  613.  
  614.       return len;
  615.    }
  616.  
  617.    public float Normalize(float[] op1) {
  618.       float len = Len(op1);
  619.       if ((double)len != (double)0.0F) {
  620.          float oneOverLen = 1.0F / len;
  621.          this.field_0[0] = op1[0] * oneOverLen;
  622.          this.field_0[1] = op1[1] * oneOverLen;
  623.          this.field_0[2] = op1[2] * oneOverLen;
  624.       }
  625.  
  626.       return len;
  627.    }
  628.  
  629.    public CodexVector() {
  630.       this.field_0[0] = 0.0F;
  631.       this.field_0[1] = 0.0F;
  632.       this.field_0[2] = 0.0F;
  633.    }
  634.  
  635.    public CodexVector(CodexVector op1) {
  636.       this.field_0[0] = op1.GetX();
  637.       this.field_0[1] = op1.GetY();
  638.       this.field_0[2] = op1.GetZ();
  639.    }
  640.  
  641.    public CodexVector(float x, float y, float z) {
  642.       this.field_0[0] = x;
  643.       this.field_0[1] = y;
  644.       this.field_0[2] = z;
  645.    }
  646.  
  647.    public CodexVector(float[] op1) {
  648.       this.field_0[0] = op1[0];
  649.       this.field_0[1] = op1[1];
  650.       this.field_0[2] = op1[2];
  651.    }
  652.  
  653.    public void Scale(float scale) {
  654.       float[] var10000 = this.field_0;
  655.       var10000[0] *= scale;
  656.       var10000 = this.field_0;
  657.       var10000[1] *= scale;
  658.       var10000 = this.field_0;
  659.       var10000[2] *= scale;
  660.    }
  661. }
  662.